package com.csi.okr.mobile.common.entity;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * 基础代码类型表
 */
@Embeddable
public class TOkrBasecodeCodeId implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	private String basecode;
	private String codeNo;

	public TOkrBasecodeCodeId() {
	}

	public TOkrBasecodeCodeId(String basecode, String codeNo) {
		this.basecode = basecode;
		this.codeNo = codeNo;
	}

	@Column(name = "BASECODE", nullable = false, length = 2)
	public String getBasecode() {
		return this.basecode;
	}

	public void setBasecode(String basecode) {
		this.basecode = basecode;
	}

	@Column(name = "CODE_NO", nullable = false, length = 2)
	public String getCodeNo() {
		return this.codeNo;
	}

	public void setCodeNo(String codeNo) {
		this.codeNo = codeNo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TOkrBasecodeCodeId))
			return false;
		TOkrBasecodeCodeId castOther = (TOkrBasecodeCodeId) other;

		return ((this.getBasecode() == castOther.getBasecode()) || (this.getBasecode() != null
				&& castOther.getBasecode() != null && this.getBasecode().equals(castOther.getBasecode())))
				&& ((this.getCodeNo() == castOther.getCodeNo()) || (this.getCodeNo() != null
						&& castOther.getCodeNo() != null && this.getCodeNo().equals(castOther.getCodeNo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getBasecode() == null ? 0 : this.getBasecode().hashCode());
		result = 37 * result + (getCodeNo() == null ? 0 : this.getCodeNo().hashCode());
		return result;
	}

}
